home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
embedded
/
ucos.exe
/
INT3.S
< prev
next >
Wrap
Text File
|
1994-06-30
|
1KB
|
60 lines
; This file contains the INT3 header, which determines which interrupt
; to process.
;
.include "stats.ah"
; .set PARA,1
.extern _tty_rx_int, _tty_tx_int, _tty_rs_int
.ifdef PARA
.extern _ppt_rx_int
.endif
.text
;-------------------------------------------------------------------
; int_3( void )
;
; Handle interrupt from internal peripherals.
;
;-------------------------------------------------------------------
.global _int_3
_int_3:
; see what pending interrupts exist
const kt1, INTR_CNTL
consth kt1, INTR_CNTL
load 0, 0, kt2, kt1 ; read interrupt status register
const kt3, TXDIA
and kt0, kt3, kt2
cpeq kt0, kt0, kt3
jmpt kt0, _tty_tx_int ; xmit data interrupt
store 0, 0, kt3, kt1 ; reset the TXDIA bit
const kt3, RXDIA
and kt0, kt3, kt2
cpeq kt0, kt0, kt3
jmpt kt0, _tty_rx_int ; receive dataa interrupt
store 0, 0, kt3, kt1 ; reset the RXDIA bit
.ifdef PARA
const kt3, PPI
and kt0, kt3, kt2
cpeq kt0, kt0, kt3
jmpt kt0, _ppt_rx_int ; parallel interrupt
store 0, 0, kt3, kt1 ; reset the PPI bit
.endif
const kt3, RXSIA
and kt0, kt3, kt2
cpeq kt0, kt0, kt3
jmpt kt0, _tty_rs_int ; serial port receive status interrupt
store 0, 0, kt3, kt1 ; reset the RXSIA bit
iret